Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
Guidelines for usage
Here are some helpful hints on using multi-page database transactions:
- Make sure there is at least one state-aware Web object.
- For
RUN set-transaction-state (“START”)note:- Continue processing requests in this agent. Remember that all requests handled by the agent (even stateless ones) are done within this transaction.
If the user has a locked agent and that agent has a multi-page transaction, then every thing done by that user will be in the transaction. Be very careful about this. The user might go back to another page or try to run another Web object. Even if these are not state aware themselves, if the agent runs them, then their changes will be within the transaction.
- When the user is done, set the transaction state to either
“UNDO”or“COMMIT”. Also set all the Web objects to stateless. Remember that setting all the objects to stateless automatically performs an“UNDO”unless you explicitly commit the transaction ahead of time.- If you decide to set
“UNDO” or“RETRY”, remember that changes made within the same Web request will also be undone. That is, code such as:
This code shows the new name for the customer. However, the change will be undone with the rest of the transaction.
- Remember to consider the case of an agent time-out. This will also force an
“UNDO”of the multi-page transaction.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |